package com.spcmg.controller;

import com.spcmg.service.ISpcStationService;
import com.spcmg.utils.JsonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 局站，用于安置通信设备若干建筑物的集合；基站站点作为局站的一种，局站类型：2010004基站站点。 前端控制器
 * </p>
 *
 * @author admin
 * @since 2021-04-13
 */
@RestController
@RequestMapping("/spc/station")
public class SpcStationController {

    @Resource
    private ISpcStationService service;

    /**
     * 根据局站Id查询局站信息和下属的机房信息
     *
     * @param stationId 局站Id
     * @return
     * @throws Exception
     */
    @PostMapping("/select/by/stationId")
    public JsonResult selectInfoByStationId(@RequestParam Long stationId) throws Exception {
        return service.selectInfoByStationId(stationId);
    }
}
